
class Hash3<K,V>

{
    /*class Node<K,V>
    {
          V val;
        Node<K,V> next;
        K key;

        public Node(K key,V val) {
            this.val = val;
            this.key=key;
        }



    }

    Node<K,V>[]arr=(Node<K,V>[])new Node[8];
    public int usesize;
    public void creat(K key,V val)
    {
        //Node b=new Node(key,val);
        //K c=key%arr.length;
        int hash=key.hashCode();
        int c=hash%arr.length;
        Node<K,V> cur=arr[c];
        while(cur!=null)
        {
            if(cur.key.equals(key))
            {
                cur.val=val;
                return;

            }

            cur=cur.next;
        }

       Node<K,V> b=new Node<>(key,val);

        b.next=arr[c];
        arr[c]=b;
        this.usesize++;
        /*if(load()>0.75)
        {
            kuorong();
        }





    }
    public  double load()
    {

        return (this.usesize)*1.0/this.arr.length;
    }
    public V search(K key)
    {
        //int d=key%arr.length;
        int ma=key.hashCode();
        int d=ma%arr.length;
        Node<K,V> m=arr[d];
        while(m!=null)
        {
            if(m.key.equals(key))
            {
                return m.val;
            }
            m=m.next;

        }
        return null;
    }
    /*public void kuorong()
    {
       Node<K,V>[]t=new Node[2*arr.length];
        int i=0;
        for(i=0;i<arr.length;i++)
        {
          Node<K,V> cur=arr[i];
            while(cur!=null)
            {
              Node<K,V> a=cur;
                 int hash=cur.key.hashCode();
                 int m=hash%2*arr.length;
                //int now=cur.key%2*arr.length;
                cur.next=t[m];
                t[now]=cur;
                cur=a;
                cur=cur.next;


            }
        }
        arr=t;
    }















public class Hash2 {
    public static void main1(String[] args) {
        //Hash3 a=new Hash();
        //a.creat("hello",1)

    }

     */
}
